package sw6.visualschedule.adminpanel;

import sw6.visualschedule.R;
import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.WindowManager;
import android.widget.TabHost;

public class MainTabs extends TabActivity {
    
	public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
	    setContentView(R.layout.main);
	    
	    Resources res = getResources(); // Resource object to get Drawables
	    TabHost tabHost = getTabHost();  // The activity TabHost
	    TabHost.TabSpec spec;  // Resusable TabSpec for each tab
	    Intent intent;  // Reusable Intent for each tab

	    intent = new Intent().setClass(this, Activities.class);
	    spec = tabHost.newTabSpec(getString(R.string.adm_tab_activities_title)).setIndicator(getString(R.string.adm_tab_activities_title),res.getDrawable(R.drawable.admin_tab_gear)).setContent(intent);
	    tabHost.addTab(spec);

	    intent = new Intent().setClass(this, Planning.class);
	    spec = tabHost.newTabSpec(getString(R.string.adm_tab_planning_title)).setIndicator(getString(R.string.adm_tab_planning_title),res.getDrawable(R.drawable.admin_tab_calendar)).setContent(intent);	    
	    tabHost.addTab(spec);
	}
	
}